package com.dc.flow

import android.util.Log
import androidx.activity.viewModels
import com.dc.flow.ext.repeatOnLifecycleWrap
import com.dc.flow.ui.BaseFlowActivity

class FlowActivity : BaseFlowActivity<FlowViewModel>(){

    private val viewModel by viewModels<FlowViewModel>()

    override fun layoutId(): Int  = R.layout.activity_flow

    override fun createViewModel(): FlowViewModel = viewModel

    override fun initView() {

    }

    override fun initData() {
        viewModel.requestInfo()
    }


    override fun createObserver() {
        repeatOnLifecycleWrap {
            viewModel.requestInfo.process(scope = this) {
                Log.e("---===", it)
            }
        }
    }
}